#!/bin/sh

mkdir -p /usr/{bin,share/{snapfly,locale/ru/LC_MESSAGES}}
 
cp -a src/images /usr/share/snapfly
cp -a src/snapfly_core /usr/share/snapfly
cat src/snapfly > /usr/share/snapfly/snapfly
cat src/snapfly-show > /usr/share/snapfly/snapfly-show
 
cd lang
msgfmt ru_RU.po
 
cd ..
mv lang/messages.mo /usr/share/locale/ru/LC_MESSAGES/snapfly.mo
 
chmod 755 /usr/share/snapfly/snapfly
chmod 755 /usr/share/snapfly/snapfly-show
 
ln -s /usr/share/snapfly/snapfly /usr/bin
ln -s /usr/share/snapfly/snapfly-show /usr/bin

